toOption

abstract fun toOption(): Option<T>

Converts this Try to Option.

Return

None if this is Failure or Some if this is Success.